#include <stdio.h>
int main(){
    printf("input a number for loop:");
    int num=0;
    scanf("%d",&num);
    int sum=0;
    for(int i=1;i<=num;i++){
        sum+=i;
    }
    printf("sum=%d",sum);
}